<?php

use Doctrine\Common\Annotations\AnnotationRegistry;

$loader = require __DIR__.'/../vendor/autoload.php';

// intl
if (!function_exists('intl_get_error_code')) {
    require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';

    $loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
}

AnnotationRegistry::registerLoader(array($loader, 'loadClass'));

//$loader->registerNamespaces(array(
//	'Knp\\Component'      => __DIR__.'/../vendor/knp-components/src',
//	'Knp'                 => __DIR__.'/../vendor/bundles',
//	'Zend'                => __DIR__.'/../vendor/Zend/library',
//	// ...
//));

return $loader;
